<template>
	<div class="noticeContent">
		
		<!--头部-->
		<my-header :title="'商城快讯'" :hasTitle="true" :hasBack="true" ></my-header>
		<!--<div style="height:3rem;"></div>-->
		<div class="centent" style="width: 100%;flex:1;overflow-y:auto;">
				<!--消息数据是空的-->
		    	<!--消息列表-->
			<ul class="message_list" v-if="myData" style="text-align: left;">
					<!-- v-show="item.status !== 1 && item.status !== 3" -->
				<div v-for="(item, index) in myData" :key="index">
	
					
					<!--<li style="text-align: left;">-->
						<h2 class="title">{{item.title}}</h2>
						<div class="release_time" style="text-align: left;"><span>{{item.createTm | startTime}}</span></div>
						<!--<img :src="item.imageUrl" />-->
						 <p v-html="item.content" class="contentZx">{{item.content}}</p> 
					<!--</li>-->
				</div>
			</ul>
			<div class="no_data" v-else>
			    <img src="static/image/no_order.png"/>
			    <p>暂无快讯~</p>
			    <!-- <div class="back_home aui-btn aui-btn-outlined" @click.stop="goHome">逛逛首页</div> -->
			</div>
		</div>
		
	</div>
</template>
<script>
	 import MyHeader from "../../real-containers/header";
     export default {
     	props: ['myData'],
        components:{
        	'my-header':MyHeader
        },
        data () {
            return {
                pageTree: [],
                flag:false
            }
        },
        filters: {
			startTime: function(time) {
				let date = new Date(time);
				// return date.getFullYear() + "-" + date.getMonth() + "-";
				return `${date.getFullYear()}-${date.getMonth()+ 1}-${date.getDate()}  ${date.getHours() > 9 ? date.getHours() : '0' + date.getHours()}:${date.getMinutes() > 9 ? date.getMinutes() : '0' + date.getMinutes()}`;
			}
		},
        watch:{
        	myData(newVal,oldVal){
        		console.log(newVal,oldVal,'newold');
        	}
        }
     }
</script>
<style scoped="scoped">
    .noticeContent {
	    width: 100%;
	    height: 100%;
	    display: flex;
	    flex-direction: column;
	    justify-content: space-between;
	}
  
    .message_list li p {
	    line-height: 1.6rem;
	    position: relative;
	     white-space:normal; 
	     overflow: inherit; 
	     text-overflow: inherit; 
	    padding-right: 0.75rem;
	    width: 100%;
	}
	.title{
		margin-top: 1rem;
	}
	.contentZx img {
    	width: 100%;
	}
</style>